import request from '@/utils/request';
import {stringify} from "qs";

export async function findAll(payload) {
  return request(`/admin/ad/image/list`, {
    // return request(`${HOST_URL}/user/signin`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded;'
    },
    body: `${stringify(payload)}`
  });
}

export async function save(payload) {
  return request(`/admin/ad/image/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded;'
    },
    body: `${stringify(payload)}`
  });
}

export async function del(payload) {
  return request(`/admin/ad/image/delete/${payload.id}`);
}

export async function detail(payload) {
  return request(`/ad/image/find/${payload}`);
}

export async function AllBook() {
  /*return request(`/admin/activity/list`, {
    // return request(`${HOST_URL}/user/signin`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded;'
    },
    body: ""
  });*/
}
